3.110 \(\int \frac{(g+h x) (d+e x+f x^2)}{(a+c x^2)^{3/2}} \, dx\)

Optimal. Leaf size=100 \[ -\frac{h \sqrt{a+c x^2} (c d-2 a f)}{a c^2}+\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) (e h+f g)}{c^{3/2}}-\frac{(g+h x) (a e-x (c d-a f))}{a c \sqrt{a+c x^2}} \]

[Out]

-(((a*e - (c*d - a*f)*x)*(g + h*x))/(a*c*Sqrt[a + c*x^2])) - ((c*d - 2*a*f)*h*Sqrt[a + c*x^2])/(a*c^2) + ((f*g
 + e*h)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/c^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.0869532, antiderivative size = 100, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {1645, 641, 217, 206} \[ -\frac{h \sqrt{a+c x^2} (c d-2 a f)}{a c^2}+\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) (e h+f g)}{c^{3/2}}-\frac{(g+h x) (a e-x (c d-a f))}{a c \sqrt{a+c x^2}} \]

Antiderivative was successfully verified.

[In]

Int[((g + h*x)*(d + e*x + f*x^2))/(a + c*x^2)^(3/2),x]

[Out]

-(((a*e - (c*d - a*f)*x)*(g + h*x))/(a*c*Sqrt[a + c*x^2])) - ((c*d - 2*a*f)*h*Sqrt[a + c*x^2])/(a*c^2) + ((f*g
 + e*h)*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/c^(3/2)

Rule 1645

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + c
*x^2, x], x, 1]}, Simp[((d + e*x)^m*(a + c*x^2)^(p + 1)*(a*g - c*f*x))/(2*a*c*(p + 1)), x] + Dist[1/(2*a*c*(p
+ 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*c*(p + 1)*(d + e*x)*Q - a*e*g*m + c*d*f*(2*p
+ 3) + c*e*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(g+h x) \left (d+e x+f x^2\right )}{\left (a+c x^2\right )^{3/2}} \, dx &=-\frac{(a e-(c d-a f) x) (g+h x)}{a c \sqrt{a+c x^2}}-\frac{\int \frac{-a (f g+e h)+(c d-2 a f) h x}{\sqrt{a+c x^2}} \, dx}{a c}\\ &=-\frac{(a e-(c d-a f) x) (g+h x)}{a c \sqrt{a+c x^2}}-\frac{(c d-2 a f) h \sqrt{a+c x^2}}{a c^2}+\frac{(f g+e h) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{c}\\ &=-\frac{(a e-(c d-a f) x) (g+h x)}{a c \sqrt{a+c x^2}}-\frac{(c d-2 a f) h \sqrt{a+c x^2}}{a c^2}+\frac{(f g+e h) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{c}\\ &=-\frac{(a e-(c d-a f) x) (g+h x)}{a c \sqrt{a+c x^2}}-\frac{(c d-2 a f) h \sqrt{a+c x^2}}{a c^2}+\frac{(f g+e h) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{c^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.151096, size = 102, normalized size = 1.02 \[ \frac{a^{3/2} \sqrt{c} \sqrt{\frac{c x^2}{a}+1} \sinh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (e h+f g)+2 a^2 f h-a c (d h+e (g+h x)+f x (g-h x))+c^2 d g x}{a c^2 \sqrt{a+c x^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[((g + h*x)*(d + e*x + f*x^2))/(a + c*x^2)^(3/2),x]

[Out]

(2*a^2*f*h + c^2*d*g*x - a*c*(d*h + f*x*(g - h*x) + e*(g + h*x)) + a^(3/2)*Sqrt[c]*(f*g + e*h)*Sqrt[1 + (c*x^2
)/a]*ArcSinh[(Sqrt[c]*x)/Sqrt[a]])/(a*c^2*Sqrt[a + c*x^2])

________________________________________________________________________________________

Maple [A]  time = 0.056, size = 163, normalized size = 1.6 \begin{align*}{\frac{fh{x}^{2}}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+2\,{\frac{afh}{{c}^{2}\sqrt{c{x}^{2}+a}}}-{\frac{ehx}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}-{\frac{fgx}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+{eh\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+{fg\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}-{\frac{dh}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}-{\frac{eg}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+{\frac{dgx}{a}{\frac{1}{\sqrt{c{x}^{2}+a}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)*(f*x^2+e*x+d)/(c*x^2+a)^(3/2),x)

[Out]

h*f*x^2/c/(c*x^2+a)^(1/2)+2*h*f*a/c^2/(c*x^2+a)^(1/2)-x/c/(c*x^2+a)^(1/2)*e*h-x/c/(c*x^2+a)^(1/2)*f*g+1/c^(3/2
)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))*e*h+1/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))*f*g-1/c/(c*x^2+a)^(1/2)*d*h-1/c/(c
*x^2+a)^(1/2)*e*g+d*g*x/a/(c*x^2+a)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(f*x^2+e*x+d)/(c*x^2+a)^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.9, size = 606, normalized size = 6.06 \begin{align*} \left [\frac{{\left (a^{2} f g + a^{2} e h +{\left (a c f g + a c e h\right )} x^{2}\right )} \sqrt{c} \log \left (-2 \, c x^{2} - 2 \, \sqrt{c x^{2} + a} \sqrt{c} x - a\right ) + 2 \,{\left (a c f h x^{2} - a c e g -{\left (a c d - 2 \, a^{2} f\right )} h -{\left (a c e h -{\left (c^{2} d - a c f\right )} g\right )} x\right )} \sqrt{c x^{2} + a}}{2 \,{\left (a c^{3} x^{2} + a^{2} c^{2}\right )}}, -\frac{{\left (a^{2} f g + a^{2} e h +{\left (a c f g + a c e h\right )} x^{2}\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) -{\left (a c f h x^{2} - a c e g -{\left (a c d - 2 \, a^{2} f\right )} h -{\left (a c e h -{\left (c^{2} d - a c f\right )} g\right )} x\right )} \sqrt{c x^{2} + a}}{a c^{3} x^{2} + a^{2} c^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(f*x^2+e*x+d)/(c*x^2+a)^(3/2),x, algorithm="fricas")

[Out]

[1/2*((a^2*f*g + a^2*e*h + (a*c*f*g + a*c*e*h)*x^2)*sqrt(c)*log(-2*c*x^2 - 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) +
2*(a*c*f*h*x^2 - a*c*e*g - (a*c*d - 2*a^2*f)*h - (a*c*e*h - (c^2*d - a*c*f)*g)*x)*sqrt(c*x^2 + a))/(a*c^3*x^2
+ a^2*c^2), -((a^2*f*g + a^2*e*h + (a*c*f*g + a*c*e*h)*x^2)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) - (a*c
*f*h*x^2 - a*c*e*g - (a*c*d - 2*a^2*f)*h - (a*c*e*h - (c^2*d - a*c*f)*g)*x)*sqrt(c*x^2 + a))/(a*c^3*x^2 + a^2*
c^2)]

________________________________________________________________________________________

Sympy [A]  time = 12.7682, size = 209, normalized size = 2.09 \begin{align*} d h \left (\begin{cases} - \frac{1}{c \sqrt{a + c x^{2}}} & \text{for}\: c \neq 0 \\\frac{x^{2}}{2 a^{\frac{3}{2}}} & \text{otherwise} \end{cases}\right ) + e g \left (\begin{cases} - \frac{1}{c \sqrt{a + c x^{2}}} & \text{for}\: c \neq 0 \\\frac{x^{2}}{2 a^{\frac{3}{2}}} & \text{otherwise} \end{cases}\right ) + e h \left (\frac{\operatorname{asinh}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{c^{\frac{3}{2}}} - \frac{x}{\sqrt{a} c \sqrt{1 + \frac{c x^{2}}{a}}}\right ) + f g \left (\frac{\operatorname{asinh}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{c^{\frac{3}{2}}} - \frac{x}{\sqrt{a} c \sqrt{1 + \frac{c x^{2}}{a}}}\right ) + f h \left (\begin{cases} \frac{2 a}{c^{2} \sqrt{a + c x^{2}}} + \frac{x^{2}}{c \sqrt{a + c x^{2}}} & \text{for}\: c \neq 0 \\\frac{x^{4}}{4 a^{\frac{3}{2}}} & \text{otherwise} \end{cases}\right ) + \frac{d g x}{a^{\frac{3}{2}} \sqrt{1 + \frac{c x^{2}}{a}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(f*x**2+e*x+d)/(c*x**2+a)**(3/2),x)

[Out]

d*h*Piecewise((-1/(c*sqrt(a + c*x**2)), Ne(c, 0)), (x**2/(2*a**(3/2)), True)) + e*g*Piecewise((-1/(c*sqrt(a +
c*x**2)), Ne(c, 0)), (x**2/(2*a**(3/2)), True)) + e*h*(asinh(sqrt(c)*x/sqrt(a))/c**(3/2) - x/(sqrt(a)*c*sqrt(1
 + c*x**2/a))) + f*g*(asinh(sqrt(c)*x/sqrt(a))/c**(3/2) - x/(sqrt(a)*c*sqrt(1 + c*x**2/a))) + f*h*Piecewise((2
*a/(c**2*sqrt(a + c*x**2)) + x**2/(c*sqrt(a + c*x**2)), Ne(c, 0)), (x**4/(4*a**(3/2)), True)) + d*g*x/(a**(3/2
)*sqrt(1 + c*x**2/a))

________________________________________________________________________________________

Giac [A]  time = 1.16895, size = 157, normalized size = 1.57 \begin{align*} \frac{{\left (\frac{f h x}{c} + \frac{c^{3} d g - a c^{2} f g - a c^{2} h e}{a c^{3}}\right )} x - \frac{a c^{2} d h - 2 \, a^{2} c f h + a c^{2} g e}{a c^{3}}}{\sqrt{c x^{2} + a}} - \frac{{\left (f g + h e\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{c^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)*(f*x^2+e*x+d)/(c*x^2+a)^(3/2),x, algorithm="giac")

[Out]

((f*h*x/c + (c^3*d*g - a*c^2*f*g - a*c^2*h*e)/(a*c^3))*x - (a*c^2*d*h - 2*a^2*c*f*h + a*c^2*g*e)/(a*c^3))/sqrt
(c*x^2 + a) - (f*g + h*e)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(3/2)